class loginModel{
  constructor(){
    this.db = require('../../config/db')
  }
  //账号登录查询
  longin(account,password){
    let sql = 'select * from user where account = ? and password = ?'
    return this.db.query(sql,[account,password])
  }

  //注册用户
  signUp(account,password){
    let sql = "insert into user (account,password) values (?,?)"
    console.log(account)
    return this.db.query(sql,[account,password])
    
  }

}

module.exports = new loginModel()